package com.lq.util;

import org.springframework.util.DigestUtils;

import java.io.UnsupportedEncodingException;
import java.math.BigInteger;

public class MD5Util {
    public static String getMd5Password(String str){
        byte[] md5Digest =null;
        String newgetpassword=null;
        try {
            md5Digest = DigestUtils.md5Digest(str.getBytes("UTF-8"));
            newgetpassword = new BigInteger(md5Digest).toString(16);
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return newgetpassword;
    }
    
}
